import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Detail from '../views/Detail.vue'
import User from '../views/User.vue'

const routes = [{
        path: '/',
        name: 'home',
        component: Home
    },
    {
        path: '/detail/:id',
        name: 'detail',
        component: Detail,
    },
    {
        path: '/user/:id',
        name: 'user',
        component: User,
    },
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router